home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Educ / Higher Ed / G-M / MacPhaseExtras.sit / MacPhase Extras / Macros / SliceMovie.m < prev    next >
Encoding:
Text File  |  1994-05-28  |  675 b   |  27 lines  |  [TEXT/DAHN]

  1. macro SliceMovie;
  2. { Makes a movie of 1D slices of the top most 2D window }
  3. var
  4.     boolean : hasData;
  5.     Str255 : name;
  6.     longint : y,dx,dy;
  7. begin
  8.     DisposeUnClose;
  9.     hasData:=FrontData(name,'data');
  10.     if(!hasData) then
  11.         ShowError('Error','There are no active data windows');
  12.         exit;
  13.     endif;
  14.     GetDimensions(name,dx,dy);
  15.     StartMovie('SliceMovie',300,200);
  16.     for(y,1,dy)
  17.         SliceData(name,1,y,dx,y,'Slice');
  18.         SetWindowSize('Slice',300,200,FALSE);
  19.         SetLabel('Slice','XLABEL','','Geneva',9,'PLAIN');
  20.         SetLabel('Slice','ZLABEL','','Geneva',9,'PLAIN');
  21.         SetLabel('Slice','TITLE','','Geneva',9,'PLAIN');
  22.         MoviePlot('Slice','Line Plot');
  23.         DisposeData('Slice');
  24.     endfor;
  25.     StopMovie;
  26. end;
  27.